//:C06:FBinder.cpp
// Binders aren't limited to producing predicates.
// {L} Generators
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <iostream>
#include <iterator>
#include <ostream>
#include <vector>
#include "Generators.h"
using namespace std;

int main(void)
{
    ostream_iterator<int> out(cout, " ");
    vector<int> v(15);
    srand(time(0));    // Randomize
    generate(v.begin(),v.end(), URandGen(20));
    copy(v.begin(), v.end(), out);
    transform(v.begin(), v.end(), v.begin(), bind2nd(multiplies<int>(),10));
    copy(v.begin(), v.end(), out);
}